<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>eRPC API Reference: erpc_simple_server.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">eRPC API Reference
   &#160;<span id="projectnumber">Rev. 1.7.4</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>API&#160;Reference</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('erpc__simple__server_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">erpc_simple_server.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="erpc__simple__server_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2014, Freescale Semiconductor, Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright 2016-2017 NXP</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * SPDX-License-Identifier: BSD-3-Clause</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef _EMBEDDED_RPC__SIMPLE_SERVER_H_</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#define _EMBEDDED_RPC__SIMPLE_SERVER_H_</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="erpc__server_8h.html">erpc_server.h</a>&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">// Classes</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceerpc.html">erpc</a> {</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classerpc_1_1_simple_server.html">   31</a></span>&#160;<span class="keyword">class </span><a class="code" href="classerpc_1_1_simple_server.html">SimpleServer</a> : <span class="keyword">public</span> <a class="code" href="classerpc_1_1_server.html">Server</a></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;{</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classerpc_1_1_simple_server.html#a02c18785b49f6e65017f58530480183d">   39</a></span>&#160;    <a class="code" href="classerpc_1_1_simple_server.html#a02c18785b49f6e65017f58530480183d">SimpleServer</a>(<span class="keywordtype">void</span>)</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    : <a class="code" href="classerpc_1_1_simple_server.html#a2d72700efd180999dd0d09e448132b6a">m_isServerOn</a>(true)</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    {</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    }</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> <a class="code" href="classerpc_1_1_simple_server.html#a7a093d686b7d08613c9f973e295e5e08">run</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> <a class="code" href="classerpc_1_1_simple_server.html#ab193473ca5e3807142bc997d8e90628a">poll</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classerpc_1_1_simple_server.html#a8e53809da040daa46b843b1a55e60a10">stop</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <a class="code" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> <a class="code" href="classerpc_1_1_simple_server.html#aaebcde628fafb08ee1bcdb4dd6593f53">runInternalBegin</a>(<a class="code" href="classerpc_1_1_codec.html">Codec</a> **codec, <a class="code" href="classerpc_1_1_message_buffer.html">MessageBuffer</a> &amp;buff, <a class="code" href="erpc__codec_8h.html#a7116f64fb1351d72417155cfed485478">message_type_t</a> &amp;msgType, uint32_t &amp;serviceId,</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;                                   uint32_t &amp;methodId, uint32_t &amp;sequence);</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <a class="code" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> <a class="code" href="classerpc_1_1_simple_server.html#a6f585d5c7d98d79af70f0caea33504f5">runInternalEnd</a>(<a class="code" href="classerpc_1_1_codec.html">Codec</a> *codec, <a class="code" href="erpc__codec_8h.html#a7116f64fb1351d72417155cfed485478">message_type_t</a> msgType, uint32_t serviceId, uint32_t methodId,</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;                                 uint32_t sequence);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="preprocessor">#if ERPC_NESTED_CALLS</span></div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> <a class="code" href="classerpc_1_1_simple_server.html#a7a093d686b7d08613c9f973e295e5e08">run</a>(<a class="code" href="classerpc_1_1_request_context.html">RequestContext</a> &amp;request);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <a class="code" href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a> <a class="code" href="classerpc_1_1_simple_server.html#a6240256d54741c25d936166a5a9d7f03">runInternal</a>(<span class="keywordtype">void</span>);</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classerpc_1_1_simple_server.html#a71ddeea79721305ff5f98a0d1abc7642">disposeBufferAndCodec</a>(<a class="code" href="classerpc_1_1_codec.html">Codec</a> *codec);</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="classerpc_1_1_simple_server.html#a2d72700efd180999dd0d09e448132b6a">  121</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classerpc_1_1_simple_server.html#a2d72700efd180999dd0d09e448132b6a">m_isServerOn</a>; </div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;};</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;} <span class="comment">// namespace erpc</span></div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="preprocessor">#endif // _EMBEDDED_RPC__SIMPLE_SERVER_H_</span></div><div class="ttc" id="group__infra_html_ga5f8872e58f09a16d192bf664f9898651"><div class="ttname"><a href="group__infra.html#ga5f8872e58f09a16d192bf664f9898651">erpc_status_t</a></div><div class="ttdeci">int32_t erpc_status_t</div><div class="ttdoc">Type used for all status and error return values. </div><div class="ttdef"><b>Definition:</b> erpc_common.h:86</div></div>
<div class="ttc" id="erpc__codec_8h_html_a7116f64fb1351d72417155cfed485478"><div class="ttname"><a href="erpc__codec_8h.html#a7116f64fb1351d72417155cfed485478">erpc::message_type_t</a></div><div class="ttdeci">message_type_t</div><div class="ttdoc">Types of messages that can be encoded. </div><div class="ttdef"><b>Definition:</b> erpc_codec.h:33</div></div>
<div class="ttc" id="classerpc_1_1_simple_server_html_a6240256d54741c25d936166a5a9d7f03"><div class="ttname"><a href="classerpc_1_1_simple_server.html#a6240256d54741c25d936166a5a9d7f03">erpc::SimpleServer::runInternal</a></div><div class="ttdeci">erpc_status_t runInternal(void)</div><div class="ttdoc">Run server implementation. </div><div class="ttdef"><b>Definition:</b> erpc_simple_server.cpp:30</div></div>
<div class="ttc" id="classerpc_1_1_simple_server_html_a6f585d5c7d98d79af70f0caea33504f5"><div class="ttname"><a href="classerpc_1_1_simple_server.html#a6f585d5c7d98d79af70f0caea33504f5">erpc::SimpleServer::runInternalEnd</a></div><div class="ttdeci">erpc_status_t runInternalEnd(Codec *codec, message_type_t msgType, uint32_t serviceId, uint32_t methodId, uint32_t sequence)</div><div class="ttdoc">This function process message and handle sending respond. </div><div class="ttdef"><b>Definition:</b> erpc_simple_server.cpp:105</div></div>
<div class="ttc" id="classerpc_1_1_simple_server_html_ab193473ca5e3807142bc997d8e90628a"><div class="ttname"><a href="classerpc_1_1_simple_server.html#ab193473ca5e3807142bc997d8e90628a">erpc::SimpleServer::poll</a></div><div class="ttdeci">virtual erpc_status_t poll(void)</div><div class="ttdoc">Run server implementation only if exist message to process. </div><div class="ttdef"><b>Definition:</b> erpc_simple_server.cpp:199</div></div>
<div class="ttc" id="classerpc_1_1_codec_html"><div class="ttname"><a href="classerpc_1_1_codec.html">erpc::Codec</a></div><div class="ttdoc">Abstract serialization encoder/decoder interface. </div><div class="ttdef"><b>Definition:</b> erpc_codec.h:50</div></div>
<div class="ttc" id="classerpc_1_1_simple_server_html_a8e53809da040daa46b843b1a55e60a10"><div class="ttname"><a href="classerpc_1_1_simple_server.html#a8e53809da040daa46b843b1a55e60a10">erpc::SimpleServer::stop</a></div><div class="ttdeci">virtual void stop(void)</div><div class="ttdoc">This function sets server from ON to OFF. </div><div class="ttdef"><b>Definition:</b> erpc_simple_server.cpp:215</div></div>
<div class="ttc" id="classerpc_1_1_simple_server_html_a02c18785b49f6e65017f58530480183d"><div class="ttname"><a href="classerpc_1_1_simple_server.html#a02c18785b49f6e65017f58530480183d">erpc::SimpleServer::SimpleServer</a></div><div class="ttdeci">SimpleServer(void)</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> erpc_simple_server.h:39</div></div>
<div class="ttc" id="classerpc_1_1_simple_server_html_a2d72700efd180999dd0d09e448132b6a"><div class="ttname"><a href="classerpc_1_1_simple_server.html#a2d72700efd180999dd0d09e448132b6a">erpc::SimpleServer::m_isServerOn</a></div><div class="ttdeci">bool m_isServerOn</div><div class="ttdef"><b>Definition:</b> erpc_simple_server.h:121</div></div>
<div class="ttc" id="classerpc_1_1_simple_server_html_a7a093d686b7d08613c9f973e295e5e08"><div class="ttname"><a href="classerpc_1_1_simple_server.html#a7a093d686b7d08613c9f973e295e5e08">erpc::SimpleServer::run</a></div><div class="ttdeci">virtual erpc_status_t run(void)</div><div class="ttdoc">Run server in infinite loop. </div><div class="ttdef"><b>Definition:</b> erpc_simple_server.cpp:138</div></div>
<div class="ttc" id="classerpc_1_1_server_html"><div class="ttname"><a href="classerpc_1_1_server.html">erpc::Server</a></div><div class="ttdoc">Based server functionality. </div><div class="ttdef"><b>Definition:</b> erpc_server.h:107</div></div>
<div class="ttc" id="classerpc_1_1_message_buffer_html"><div class="ttname"><a href="classerpc_1_1_message_buffer.html">erpc::MessageBuffer</a></div><div class="ttdoc">Represents a memory buffer containing a message. </div><div class="ttdef"><b>Definition:</b> erpc_message_buffer.h:36</div></div>
<div class="ttc" id="namespaceerpc_html"><div class="ttname"><a href="namespaceerpc.html">erpc</a></div><div class="ttdef"><b>Definition:</b> erpc_arbitrated_client_manager.h:25</div></div>
<div class="ttc" id="classerpc_1_1_simple_server_html_a71ddeea79721305ff5f98a0d1abc7642"><div class="ttname"><a href="classerpc_1_1_simple_server.html#a71ddeea79721305ff5f98a0d1abc7642">erpc::SimpleServer::disposeBufferAndCodec</a></div><div class="ttdeci">void disposeBufferAndCodec(Codec *codec)</div><div class="ttdoc">Disposing message buffers and codecs. </div><div class="ttdef"><b>Definition:</b> erpc_simple_server.cpp:18</div></div>
<div class="ttc" id="classerpc_1_1_simple_server_html_aaebcde628fafb08ee1bcdb4dd6593f53"><div class="ttname"><a href="classerpc_1_1_simple_server.html#aaebcde628fafb08ee1bcdb4dd6593f53">erpc::SimpleServer::runInternalBegin</a></div><div class="ttdeci">erpc_status_t runInternalBegin(Codec **codec, MessageBuffer &amp;buff, message_type_t &amp;msgType, uint32_t &amp;serviceId, uint32_t &amp;methodId, uint32_t &amp;sequence)</div><div class="ttdoc">This function handle receiving request message and reading base info about message. </div><div class="ttdef"><b>Definition:</b> erpc_simple_server.cpp:50</div></div>
<div class="ttc" id="classerpc_1_1_simple_server_html"><div class="ttname"><a href="classerpc_1_1_simple_server.html">erpc::SimpleServer</a></div><div class="ttdoc">Based server implementation. </div><div class="ttdef"><b>Definition:</b> erpc_simple_server.h:31</div></div>
<div class="ttc" id="erpc__server_8h_html"><div class="ttname"><a href="erpc__server_8h.html">erpc_server.h</a></div></div>
<div class="ttc" id="classerpc_1_1_request_context_html"><div class="ttname"><a href="classerpc_1_1_request_context.html">erpc::RequestContext</a></div><div class="ttdoc">Encapsulates all information about a request. </div><div class="ttdef"><b>Definition:</b> erpc_client_manager.h:219</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">Copyright 2016-2020 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
